<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>

<body>
	
    <center>
    	<table border="1" width="300px">
        	<tr>
            	<th><input type="checkbox" name="flags" value="0"></th>
                <th>编号</th>
                <th>供应商名称</th>
            </tr>
            
            <tr align="center">
            	<td>
                	<input type="checkbox" value="10000:联想"  name="supliers"/>
                </td>
                <td>10000</td>
                <td>联想</td>
            </tr>
             <tr align="center">
            	<td>
                	<input type="checkbox" value="10001:方正"  name="supliers"/>
                </td>
                <td>10001</td>
                <td>方正</td>
            </tr>
             <tr align="center">
            	<td>
                	<input type="checkbox" value="10002:戴尔"  name="supliers"/>
                </td>
                <td>10002</td>
                <td>戴尔</td>
            </tr>
        </table>
        
        <input type="button" value="确定"  onclick="test()">
    </center>
   
</body>
<script>
	function test(){
		var checks = document.getElementsByName("supliers");
		var count = 0;
		var value ="";
		for(var i = 0;i<checks.length;i++){
			if(checks[i].checked){
				count++;
				value+=checks[i].value+",";
			}
		}
		if(count<1){
			alert("你至少选择一个")
		}else{
			alert("hello");
		}
	}
</script>